package Demo1;

public class Dog extends Animal implements IRunning,ISwim{
    public void run(){
        System.out.println(this.getName()+"在跑步");
    }
    public void eat(){
        System.out.println(getName()+"正在吃狗粮");
    }

    @Override
    public void swim() {
        System.out.println(this.getName()+"正在游泳");
    }
    public boolean equals(Object object){
        Dog tmp=(Dog)object;
        return tmp.getName().equals(this.getName());
    }
}
